package com.xuxuduoduomei.blog.web;

import com.xuxuduoduomei.blog.NotFoundException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author：xuxuduoduomei
 * @date：2022/1/16 15:21
 * @description：
 */

@Controller
public class IndexController {

    @GetMapping("/")
    public String index() {
//        int i = 9 / 0;
        String blog = null;
        if (blog == null) {
            throw new NotFoundException("博客找不着啦！！！");
        }
        return "index";
    }
}
